package com.air.common.service;

import java.util.List;

import com.air.common.exception.OutofPageBoundException;
import com.air.common.util.QueryCondition;
import com.air.common.util.QueryCondition4Update;
import com.air.common.vo.PageResultListVO;

public interface IBaseService {
	public <T> T findById(int id);
	public <T> int  updateById(T object);
	public <T> T insert(T object) throws Exception;
	public int deleteById(int id);
	
	public <T> List<T> queryByCondition(QueryCondition condition);
	/**
	 * ��ҳ����
	 * @param <T>
	 * @param condition
	 * @param curPageNum 'zero' based
	 * @param pageLimit  ÿҳ����¼��
	 * @return
	 * @throws OutofPageBoundException 
	 */
	public PageResultListVO queryByCondition(QueryCondition condition,int curPageNum,int pageLimit) throws OutofPageBoundException;
	public int updateByCondition(QueryCondition4Update condition);
	public int deleteByCondition(QueryCondition condition);
	public int countByCondition(QueryCondition condition);
}
